<?php

declare(strict_types=1);

namespace app\model;

use app\BaseModel;
use think\model\concern\SoftDelete;

class ProdBrand extends BaseModel
{
    use SoftDelete;

    protected $name = 'prod_brand';

    protected $autoWriteTimestamp = 'datetime';

    protected $json = ['content'];

    public function ownerOrg()
    {
        return $this->belongsTo(Org::class, 'owner_org_id');
    }

    public function products()
    {
        return $this->hasMany(Prod::class, 'brand_id');
    }
}
